package com.frejoys.service.impl;

import cn.hutool.core.bean.BeanUtil;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.frejoys.common.vo.black.TmpVo;
import com.frejoys.dao.entity.Tmp;
import com.frejoys.dao.mapper.TmpMapper;
import com.frejoys.service.TmpService;
import lombok.RequiredArgsConstructor;
import org.springframework.stereotype.Service;

/**
 * @author wangzhicheng
 * @date 2024/5/29 22:11
 * @description TODO
 */
@Service
@RequiredArgsConstructor
public class TmpServiceImpl extends ServiceImpl<TmpMapper, Tmp> implements TmpService {
    /**
     * 查询数据
     */
    @Override
    public TmpVo getOnly() {
        return BeanUtil.copyProperties(baseMapper.selectOne(Wrappers.<Tmp>lambdaQuery().eq(Tmp::getId, 1)), TmpVo.class);
    }
}
